/**
 *高德地图
 */
import L from "leaflet";
export const mapabcTiledMap = {
  tiledLayer(type, options) {
    if (options == null) {
      options = { subdomains: ["1", "2", "3", "4"] };
    } else {
      options["subdomains"] = ["1", "2", "3", "4"];
    }
    if (type === "img") {
      return L.tileLayer(
        "http://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
        options
      );
    } else if (type === "vec") {
      return L.tileLayer(
        "http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
        options
      );
    } else {
      return null;
    }
  }
};
